package wuji.demospringclouduserprovider.service;

import org.springframework.stereotype.Service;
import wuji.demospringclouduserprovider.dao.UserDao;
import wuji.pojo.User;
import wuji.service.UserService;


import javax.annotation.Resource;
import java.util.List;


@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao ;

    @Override
    public User login(String username, String password) {
        return userDao.getUserByNameAndPassword(username, password);
    }

    @Override
    public List<User> userList() {
        return userDao.findAllUsers();
    }
}
